package qotwReader.types;


public enum ReaderType implements Type
{
    cybookg3,//("cybookg3"),
    cybook_opus,//("cybook_opus"),
    defaultReader("default"), // because default is a keyword in Java
    hanlinv3,//("hanlinv3"),
    hanlinv5,//("hanlinv5"),
    illiad,//("illiad"),
    irexdr1000,//("irexdr1000"),
    irexdr800,//("irexdr800"),
    kindle,//("kindle"),
    msreader,//("msreader"),
    mobipocket,//("mobipocket"),
    nook,//("nook"),
    sony,//("sony"),
    sony300,//("sony300"),
    sony900,//("sony900");
    ;
    
    final private String name;
    
    private ReaderType()
    {
        this.name = super.toString();
    }
    
    private ReaderType(String name)
    {
        this.name = name;
    }
    
    @Override
    public String toString() { return this.name; }
    
    public static ReaderType getReaderFromString(String string)
    {
        for (ReaderType r : ReaderType.values())
            if (string.equalsIgnoreCase(r.name))
                return r;
        
        return null;
    }
}
